package bomb.utils;

public class Highscores  {
    private static int[][] scores = new int[6][10];
    private static int aux;
    
    public static void pegarScore(int fase, int k, int valor){
        scores[fase][k] = valor;
    }
    public static void setScore(int fase, int novo){
        
        
        for(int j=0; j<10; j++){
            if(scores[fase][j]==0){
                scores[fase][j]=novo;
                j=10;
            }
            else{
                if(novo <= scores[fase][j]){
                    aux = scores[fase][j];
                    scores[fase][j]=novo;
                    novo=aux;
                }
            }
            

        }
        

    }
    
    public static int getScore(int fase, int k){
        return scores[fase][k];
    }
    
    public static void clearScores(int fase){
        for(int k=0; k<10; k++){
            scores[fase][k] = 0;
        }
    }
}
